/**
 * 
 */
package cn.agiledata.bank.common.bean;

/**
 * @author jianglei
 * 
 */
public class IntEnum implements Comparable {
    private int value;

    protected IntEnum(int value) {
        this.value = value;
    }

    public final int getValue() {
        return this.value;
    }

    public boolean equals(Object object) {
        if (object == null || !(object instanceof IntEnum))
            return false;
        IntEnum intEnum = (IntEnum) object;
        return this.value == intEnum.value;
    }

    public int hashCode() {
        return new Integer(this.value).hashCode();
    }

    public int compareTo(Object object) {
        IntEnum intEnum = (IntEnum) object;
        return new Integer(this.getValue()).compareTo(new Integer(intEnum
                .getValue()));
    }

    public String toString() {
        return String.valueOf(this.value);
    }
}
